package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品分类管理对象 product_category_management
 *
 * @author ruoyi
 * @date 2025-05-24
 */
public class ProductCategoryManagement extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 分类唯一标识符(主键) */
    private Long id;

    /** 商品分类名称 */
    @Excel(name = "商品分类名称")
    private String categoryName;

    /** 该分类下的商品数量(动态统计字段，建议通过触发器/存储过程维护) */
    @Excel(name = "该分类下的商品数量(动态统计字段，建议通过触发器/存储过程维护)")
    private Long productCount;

    /** 分类当前状态 */
    @Excel(name = "分类当前状态")
    private String status;

    /** 分类在列表中的排序序号 */
    @Excel(name = "分类在列表中的排序序号")
    private Long sortOrder;

    /** 是否参与规格分类(0:否,1:是) */
    @Excel(name = "是否参与规格分类(0:否,1:是)")
    private Integer participateSpecCategory;

    /** 上级分类ID(实现分类层级结构，NULL表示顶级分类) */
    @Excel(name = "上级分类ID(实现分类层级结构，NULL表示顶级分类)")
    private Long parentCategoryId;

    /** 关联的商品分类ID(用于跨分类关联，可选) */
    @Excel(name = "关联的商品分类ID(用于跨分类关联，可选)")
    private Long linkedCategoryId;

    /** 关联的规格分类ID(若分类需要绑定特定规格组) */
    @Excel(name = "关联的规格分类ID(若分类需要绑定特定规格组)")
    private Long specCategoryId;

    /** 规格分类名称(冗余字段，用于快速查询，可通过关联表动态获取) */
    @Excel(name = "规格分类名称(冗余字段，用于快速查询，可通过关联表动态获取)")
    private String specCategoryName;

    /** 分类创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "分类创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date addTime;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setCategoryName(String categoryName)
    {
        this.categoryName = categoryName;
    }

    public String getCategoryName()
    {
        return categoryName;
    }

    public void setProductCount(Long productCount)
    {
        this.productCount = productCount;
    }

    public Long getProductCount()
    {
        return productCount;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setSortOrder(Long sortOrder)
    {
        this.sortOrder = sortOrder;
    }

    public Long getSortOrder()
    {
        return sortOrder;
    }

    public void setParticipateSpecCategory(Integer participateSpecCategory)
    {
        this.participateSpecCategory = participateSpecCategory;
    }

    public Integer getParticipateSpecCategory()
    {
        return participateSpecCategory;
    }

    public void setParentCategoryId(Long parentCategoryId)
    {
        this.parentCategoryId = parentCategoryId;
    }

    public Long getParentCategoryId()
    {
        return parentCategoryId;
    }

    public void setLinkedCategoryId(Long linkedCategoryId)
    {
        this.linkedCategoryId = linkedCategoryId;
    }

    public Long getLinkedCategoryId()
    {
        return linkedCategoryId;
    }

    public void setSpecCategoryId(Long specCategoryId)
    {
        this.specCategoryId = specCategoryId;
    }

    public Long getSpecCategoryId()
    {
        return specCategoryId;
    }

    public void setSpecCategoryName(String specCategoryName)
    {
        this.specCategoryName = specCategoryName;
    }

    public String getSpecCategoryName()
    {
        return specCategoryName;
    }

    public void setAddTime(Date addTime)
    {
        this.addTime = addTime;
    }

    public Date getAddTime()
    {
        return addTime;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("categoryName", getCategoryName())
                .append("productCount", getProductCount())
                .append("status", getStatus())
                .append("sortOrder", getSortOrder())
                .append("participateSpecCategory", getParticipateSpecCategory())
                .append("parentCategoryId", getParentCategoryId())
                .append("linkedCategoryId", getLinkedCategoryId())
                .append("specCategoryId", getSpecCategoryId())
                .append("specCategoryName", getSpecCategoryName())
                .append("addTime", getAddTime())
                .append("updateTime", getUpdateTime())
                .append("phone", getPhone())
                .toString();
    }
}
